package com.hsh.maoduo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hsh.maoduo.common.Result;
import com.hsh.maoduo.pojo.dto.GoodsDTO;
import com.hsh.maoduo.pojo.entity.Goods;
import com.hsh.maoduo.pojo.vo.GoodsVO;

import java.util.List;

/**
 * @author USER
 * @description 针对表【goods】的数据库操作Service
 * @createDate 2023-12-23 16:35:07
 */
public interface GoodsService extends IService<Goods> {

    List<GoodsDTO> getList(GoodsVO goodsVO);

    Result export(GoodsVO goodsVO);

    Result addOne(GoodsVO goodsVO);

    Result update(GoodsVO goodsVO);

    Result delete(int id);

    int updateGoodsNum(Integer id, int updateNum);


    /**
     * 删除没有库存的商品
     *
     * @param tList
     * @param <T>
     * @return
     */
     <T> List<T> removeOutOfStockOrders(List<T> tList);

}
